html {
  height: 100%;

  &.turbolinks-progress-bar::before,
  .turbolinks-progress-bar {
    background-color: $blue !important;
    height: 3px !important;
    z-index: 400001;
  }
}

noscript {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  text-align: center;
  line-height: 1em;
  border-bottom: 1px solid $warning_border_color;
  color: $warning_text_color;
  background-color: $warning_background_color;

  h1, p {
    margin: 16px 0;
  }
}

body {
  margin: 0;
  padding: 0;
  color: $text-color;
  font: $default-font-style;
  background-color: $light-gray;
  height: 100%;
  cursor: default;

  // Fix for strange element window offset
  &.pages.edit { overflow: hidden }

  &.prevent-scrolling {
    overflow: hidden;
  }
}

h1 {
  padding: 0;
  margin: 8px;
  font-weight: bold;
  font-size: $default-font-size;

  &.resources-header {
    position: fixed;
    width: 100%;
    top: 75px;
    left: $main-menu-width + 9px;
    z-index: 2;
    margin: 0 -8px;
    padding: 16px;
    background-color: $light-gray;
  }
}

h2 {
  margin: $default-margin 0;
  padding-bottom: 5px;
  clear: both;
  font-weight: bold;
  font-size: $default-font-size;
}

h3 {
  margin: $default-margin 0;
  padding-bottom: 5px;
  font-size: $default-font-size;
  font-weight: bold;
}

p {
  margin: 0 0 2*$default-margin 0;
  white-space: normal;
}

a {
  color: $text-color;
  text-decoration: none;

  &:hover {
    text-decoration: underline;
  }

  &:focus {
    @extend %blue-focus-style;
    color: black;
  }

  img {
    border: none;
  }
}

form {
  margin-bottom: 0;
}

ul {
  padding-left: 16px;
  margin-top: 1em;
  margin-bottom: 1em;

  li {
    margin-bottom: 0.5em;
  }
}

hr {
  border: 0 none;
  border-bottom: 1px solid;
  opacity: 0.5;
}

.float_right { float: right }

.float_left { float: left }

.center {
  text-align: center;

  .spinner {
    display: inline-block;
    vertical-align: middle;
  }
}

kbd {
  font-family: Courier, monospaced;
  background: $medium-gray;
  border: $default-border;
  padding: 0.25em 0.5em;
  vertical-align: top;
  margin-right: 1ex;
  @extend %rounded-border;
}

.top-rounded-border {
  @include border-top-radius($default-border-radius);
}

.left-rounded-border {
  @include border-left-radius($default-border-radius);
}

.right-rounded-border {
  @include border-right-radius($default-border-radius);
}

.bottom-rounded-border {
  @include border-bottom-radius($default-border-radius);
}

.bottom-left-rounded-border {
  border-bottom-left-radius: $default-border-radius;
}

.disable-user-select {
  @include user-select(none);
}

.border-box-sizing {
  box-sizing: border-box;
}

span.updated_at {
  float: right;
}

a.drop_down_select img {
  float: left;
  position: relative;
  top: 2px;
  margin-right: 4px;
}

#language_select {
  margin-bottom: 4px;
}

div.source_editor textarea {
  width: 100%;
  height: 358px;
}

div.edit_source_buttons {
  height: 18px;
  margin-top: 8px;
  float: right;
  clear: both;
}

div#page {
  height: auto !important;
  height: 100%;
  min-height: 100%;
  position: relative;
/* needed for footer positioning*/
}

#archive_all .edit_images_bottom span {
  width: 19px;
  height: 19px;
  float: left;
  margin-right: 4px;
}

#archive_all .edit_images_bottom span a {
  display: block;
  height: 19px;
  width: 19px;
  background-repeat: no-repeat;
  text-decoration: none;
  background-position: left;
}

#archive_all .edit_images_bottom span a:hover {
  background-position: right;
}

#back_to_site {
  float: right;
  margin-right: 8px;
}

div#new_page_from_clipboard {
  @extend .hidden;
}

div#new_page_from_clipboard input.button {
  float: right;
}

div#new_page_from_clipboard span {
  float: left;
  line-height: 25px;
}

div#page_status_options {
  float: left;
}

div#page_editing_menu {
  overflow: auto;
  padding-left: 1px;
  padding-right: 1px;
}

#page_sorting_panel p {
  margin-top: 1em;
}

.handle {
  cursor: move;
}

.headline_text_editor {
  overflow: auto;
  width: 374px;
}

.short_content_text {
  width: 374px;
  background-color: white;
  margin-bottom: 10px;
  padding-bottom: 2px;
  padding-top: 2px;
  padding-left: 2px;
  float: none;
}

.short_content_text a {
  color: #000000;
  text-decoration: none;
  font-weight: bold;
}

.short_content_text a:hover {
  color: #000000;
  text-decoration: underline;
}

.picture_tool_assign_box {
  float: right;
  width: 105px;
  overflow: auto;
  padding: 1px;
}

/* @end */

.short_picture {
  float: left
}

.short_element {
  margin-left: 20px;
  float: left;
}

.short_element input {
  width: 190px;
  float: left;
  font: 11px $default-font-face;
}

.dashed_border {
  border: 1px dashed;
}

ul#all_files {
  list-style-type: none;
  display: block;
  margin: 0;
  padding: 0;
  width: 100%;
}

img.image_in_text {
  position: relative;
  top: 3px;
}

div.right_checkbox {
  float: left;
}

div.all_rights {
  float: left;
  clear: both;
  margin-top: 10px;
}

.date_select_without_time #date_date_4i {
  @extend .hidden;
}

.date_select_without_time #date_date_5i {
  @extend .hidden;
}

.with_padding {
  padding: 2*$default-padding;
}

.with_margin {
  margin: 2*$default-padding;
}

div#images {
  margin-top: 16px;
  margin-bottom: 8px;
  overflow: visible;
}

.foot_note, form .input .hint {
  @include form-hint;
}

#all_files td.name a {
  @include zoom-in;
}

#sitemap .placeholder {
  background-color: $medium-gray;
  margin-bottom: 0px;
  margin-left: 22px;
}

#page_selector_scroll_container {
  position: relative;
  width: 100%;
}

#page_selector_container {
  height: 230px;
  background-color: $light-gray;
  margin-bottom: 4px;
  border: 1px inset #e8e8e8;
  overflow: auto;
  padding: 4px 0 0 4px;
  @extend %rounded-border;
}

#alchemyConfirmation .alchemy_window_buttons {
  display: block;
  text-align: right;
  margin-top: 8px;
  padding-right: 8px;
}

#alchemyConfirmation_content div.alchemy_window_message {
  padding: 2*$default-padding;
}

input.with_border {
  margin: 0;
  padding: 1px;
  font-size: 12px;
  border: 1px solid silver;
}

#image_edit div {
  height: 25px;
}

#image_edit div span {
  float: left;
  padding: 0;
  margin-right: 6px;
  height: 17px;
  line-height: 19px;
}

a img {
  border-style: none;
}

#sitemap_external_links form {
  margin-left: 5px;
  margin-bottom: 4px;
}

input#link_to_text {
  border-width: 1px;
  font-size: 11px;
  line-height: 11px;
  width: 229px;
}

.link_window_tab_body {
  background-color: $light-gray;
  padding: 2*$default-padding;
  margin: 0;
}

.bordertop_white {
  border-top: 4px solid white;
  padding-top: 8px;
  padding-bottom: 8px;
  overflow: auto;
  float: none;
}

#external_link_table .padding_right {
  padding-right: 8px;
}

#external_link_table .external_address_input {
  width: 195px;
}

table.window_form td.checkbox {
  text-align: left;
}

select#url_protocol.medium {
  margin: 0;
}

#clipboard_items {

  ul {
    list-style-type: none;
    margin: 0 0 8px;
    padding: 0;
    height: 220px;
    overflow-y: auto;
    overflow-x: hidden;

    li {
      padding: 2*$default-padding;
      border: $default-border;
      background-color: white;
      @extend %rounded-border;

      &.elements {
        background-color: $medium-gray;
      }

      .icon {
        vertical-align: text-bottom;
        margin-right: $default-padding;
      }

      .float_right .icon {
        margin-right: 0;
      }
    }
  }
}

#trash_items {
  height: 310px;
  overflow-x: hidden;
  overflow-y: auto;
  margin-bottom: 1em;
}

.mceEditor table {
  border-spacing: 0 !important;
}

div.browse {
  margin-bottom: 1em;
}

#alchemy_preview_window {
  box-sizing: border-box;
  position: absolute;
  left: $main-menu-width;
  top: 75px;
  width: auto;
  height: auto;
  border: 0 none;
  background: #fff;
  border-right: $default-border;
  @include transition(200ms ease-in-out);

  .collapsed-menu & {
    left: $collapsed-main-menu-width;
  }
}

#error_trace {
  border: $default-border;
  width: 80%;
  padding: $default-padding;
  overflow: auto;
  @extend %rounded-border;
}

.full_width {
  width: 100%;
}

.hidden {
  display: none;
}

@-moz-keyframes spin {
  from { -moz-transform: rotate(0deg); }
  to   { -moz-transform: rotate(360deg); }
}

@-webkit-keyframes spin {
  from { -webkit-transform: rotate(0deg); }
  to   { -webkit-transform: rotate(360deg); }
}

@keyframes spin {
  from {transform:rotate(0deg);}
  to   {transform:rotate(360deg);}
}
